Optimal. Leaf size=54 \[ \frac {x}{b}+\frac {2 a \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2814, 2739,
632, 210} \begin {gather*} \frac {2 a \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b d \sqrt {a^2+b^2}}+\frac {x}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 2739
Rule 2814
Rubi steps
\begin {align*} \int \frac {\sinh (c+d x)}{a+b \sinh (c+d x)} \, dx &=\frac {x}{b}-\frac {a \int \frac {1}{a+b \sinh (c+d x)} \, dx}{b}\\ &=\frac {x}{b}+\frac {(2 i a) \text {Subst}\left (\int \frac {1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{b d}\\ &=\frac {x}{b}-\frac {(4 i a) \text {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{b d}\\ &=\frac {x}{b}+\frac {2 a \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{b \sqrt {a^2+b^2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 64, normalized size = 1.19 \begin {gather*} \frac {\frac {c}{d}+x-\frac {2 a \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )}{\sqrt {-a^2-b^2} d}}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.54, size = 82, normalized size = 1.52
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {2 a \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b \sqrt {a^{2}+b^{2}}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(82\) |
default | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {2 a \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{b \sqrt {a^{2}+b^{2}}}-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(82\) |
risch | \(\frac {x}{b}+\frac {a \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}+a^{2}+b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d b}-\frac {a \ln \left ({\mathrm e}^{d x +c}+\frac {a \sqrt {a^{2}+b^{2}}-a^{2}-b^{2}}{\sqrt {a^{2}+b^{2}}\, b}\right )}{\sqrt {a^{2}+b^{2}}\, d b}\) | \(124\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 85, normalized size = 1.57 \begin {gather*} -\frac {a \log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b d} + \frac {d x + c}{b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 186 vs.
\(2 (51) = 102\).
time = 0.39, size = 186, normalized size = 3.44 \begin {gather*} \frac {{\left (a^{2} + b^{2}\right )} d x + \sqrt {a^{2} + b^{2}} a \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right )}{{\left (a^{2} b + b^{3}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 350 vs.
\(2 (44) = 88\).
time = 36.21, size = 350, normalized size = 6.48 \begin {gather*} \begin {cases} \tilde {\infty } x & \text {for}\: a = 0 \wedge b = 0 \wedge d = 0 \\\frac {x}{b} & \text {for}\: a = 0 \\\frac {x \sinh {\left (c \right )}}{a + b \sinh {\left (c \right )}} & \text {for}\: d = 0 \\\frac {\cosh {\left (c + d x \right )}}{a d} & \text {for}\: b = 0 \\\frac {b d x \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - b d \sqrt {- b^{2}}} - \frac {2 b}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - b d \sqrt {- b^{2}}} - \frac {d x \sqrt {- b^{2}}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - b d \sqrt {- b^{2}}} & \text {for}\: a = - \sqrt {- b^{2}} \\\frac {b d x \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} + b d \sqrt {- b^{2}}} - \frac {2 b}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} + b d \sqrt {- b^{2}}} + \frac {d x \sqrt {- b^{2}}}{b^{2} d \tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} + b d \sqrt {- b^{2}}} & \text {for}\: a = \sqrt {- b^{2}} \\\frac {a \log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} - \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{b d \sqrt {a^{2} + b^{2}}} - \frac {a \log {\left (\tanh {\left (\frac {c}{2} + \frac {d x}{2} \right )} - \frac {b}{a} + \frac {\sqrt {a^{2} + b^{2}}}{a} \right )}}{b d \sqrt {a^{2} + b^{2}}} + \frac {x}{b} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 84, normalized size = 1.56 \begin {gather*} -\frac {\frac {a \log \left (\frac {{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b} - \frac {d x + c}{b}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.82, size = 121, normalized size = 2.24 \begin {gather*} \frac {x}{b}-\frac {a\,\ln \left (\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{b^2}-\frac {2\,a\,\left (b-a\,{\mathrm {e}}^{c+d\,x}\right )}{b^2\,\sqrt {a^2+b^2}}\right )}{b\,d\,\sqrt {a^2+b^2}}+\frac {a\,\ln \left (\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{b^2}+\frac {2\,a\,\left (b-a\,{\mathrm {e}}^{c+d\,x}\right )}{b^2\,\sqrt {a^2+b^2}}\right )}{b\,d\,\sqrt {a^2+b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________